package jou.cs.service;

import jou.cs.entity.TComment;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

public interface CommentService {
    //add post
    public void addComment(TComment comment);
    //delete by id
    public void deleteComment(Long id);
    //update
    public void updateComment(TComment comment);
    //get comment by id
    public TComment getCommentById(Long id);
    //page query
    public List<Map<Object, Object>> getCommentByPage(int page);
    //get comment by user id
    public List<Map<Object,Object>> getCommentByUserId(Long uid);
    //get comment by user id and page
    public Page<TComment> getCommentByUserIdAndPage(Long uid, int page);


    List<Map<String, Object>> getComByPid(Long id);
    List<Object> getPageByPid(Long id, Integer page);

    Long getMaxId();
}
